import '@js/init.js'
import { userLoginData} from '../utils/getData'
$('#loginBtn').click( async function () {
    let username = $('#username').val();
    let password = $('#password').val();
    let data = await   userLoginData(username,password);
    if(data.code){
        alert(data.message);
        localStorage.token = data.token;
        location.href='./index.html';
    }
})